﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Znice
{
    public partial class FrmLink : Form
    {
        public FrmLink()
        {
            InitializeComponent();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            if (txtUrl.Text.Trim().Length <= 0)
            {
                lblTips.Visible = true;
            }
            else if (txtUrl.Text.StartsWith("https") || txtUrl.Text.StartsWith("http"))
            {
                lblTips.Visible = false;
                Tag= txtUrl.Text;
                DialogResult= DialogResult.OK;
            }
            else
            {
                lblMsg.ForeColor = Color.Red;
            }
        }
    }
}
